Optimal. Leaf size=42 \[ \frac{\sec (c+d x) (a+b \sin (c+d x))^2}{d}-2 a b x+\frac{2 b^2 \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0636757, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12, Rules used = {2861, 12, 2638} \[ \frac{\sec (c+d x) (a+b \sin (c+d x))^2}{d}-2 a b x+\frac{2 b^2 \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2861
Rule 12
Rule 2638
Rubi steps
\begin{align*} \int \sec (c+d x) (a+b \sin (c+d x))^2 \tan (c+d x) \, dx &=\frac{\sec (c+d x) (a+b \sin (c+d x))^2}{d}-\int 2 b (a+b \sin (c+d x)) \, dx\\ &=\frac{\sec (c+d x) (a+b \sin (c+d x))^2}{d}-(2 b) \int (a+b \sin (c+d x)) \, dx\\ &=-2 a b x+\frac{\sec (c+d x) (a+b \sin (c+d x))^2}{d}-\left (2 b^2\right ) \int \sin (c+d x) \, dx\\ &=-2 a b x+\frac{2 b^2 \cos (c+d x)}{d}+\frac{\sec (c+d x) (a+b \sin (c+d x))^2}{d}\\ \end{align*}
Mathematica [A] time = 0.307264, size = 66, normalized size = 1.57 \[ \frac{\sec (c+d x) \left (2 a^2+b^2 \cos (2 (c+d x))+3 b^2\right )-2 \left (a^2+2 a b (c+d x)-2 a b \tan (c+d x)+b^2\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 75, normalized size = 1.8 \begin{align*}{\frac{1}{d} \left ({\frac{{a}^{2}}{\cos \left ( dx+c \right ) }}+2\,ab \left ( \tan \left ( dx+c \right ) -dx-c \right ) +{b}^{2} \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{\cos \left ( dx+c \right ) }}+ \left ( 2+ \left ( \sin \left ( dx+c \right ) \right ) ^{2} \right ) \cos \left ( dx+c \right ) \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.48884, size = 76, normalized size = 1.81 \begin{align*} -\frac{2 \,{\left (d x + c - \tan \left (d x + c\right )\right )} a b - b^{2}{\left (\frac{1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - \frac{a^{2}}{\cos \left (d x + c\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.68545, size = 132, normalized size = 3.14 \begin{align*} -\frac{2 \, a b d x \cos \left (d x + c\right ) - b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}{d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1957, size = 111, normalized size = 2.64 \begin{align*} -\frac{2 \,{\left ({\left (d x + c\right )} a b + \frac{2 \, a b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 2 \, a b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a^{2} + 2 \, b^{2}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 1}\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]